Optimal. Leaf size=57 \[ -\frac {\sqrt {a \cos ^2(e+f x)} \csc (e+f x) \sec (e+f x)}{f}-\frac {\sqrt {a \cos ^2(e+f x)} \tan (e+f x)}{f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.07, antiderivative size = 57, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 4, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {3255, 3286,
2670, 14} \begin {gather*} -\frac {\tan (e+f x) \sqrt {a \cos ^2(e+f x)}}{f}-\frac {\csc (e+f x) \sec (e+f x) \sqrt {a \cos ^2(e+f x)}}{f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 14
Rule 2670
Rule 3255
Rule 3286
Rubi steps
\begin {align*} \int \cot ^2(e+f x) \sqrt {a-a \sin ^2(e+f x)} \, dx &=\int \sqrt {a \cos ^2(e+f x)} \cot ^2(e+f x) \, dx\\ &=\left (\sqrt {a \cos ^2(e+f x)} \sec (e+f x)\right ) \int \cos (e+f x) \cot ^2(e+f x) \, dx\\ &=-\frac {\left (\sqrt {a \cos ^2(e+f x)} \sec (e+f x)\right ) \text {Subst}\left (\int \frac {1-x^2}{x^2} \, dx,x,-\sin (e+f x)\right )}{f}\\ &=-\frac {\left (\sqrt {a \cos ^2(e+f x)} \sec (e+f x)\right ) \text {Subst}\left (\int \left (-1+\frac {1}{x^2}\right ) \, dx,x,-\sin (e+f x)\right )}{f}\\ &=-\frac {\sqrt {a \cos ^2(e+f x)} \csc (e+f x) \sec (e+f x)}{f}-\frac {\sqrt {a \cos ^2(e+f x)} \tan (e+f x)}{f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.05, size = 35, normalized size = 0.61 \begin {gather*} -\frac {\sqrt {a \cos ^2(e+f x)} \left (1+\csc ^2(e+f x)\right ) \tan (e+f x)}{f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 4.58, size = 43, normalized size = 0.75
method | result | size |
default | \(-\frac {\cos \left (f x +e \right ) a \left (\sin ^{2}\left (f x +e \right )+1\right )}{\sin \left (f x +e \right ) \sqrt {a \left (\cos ^{2}\left (f x +e \right )\right )}\, f}\) | \(43\) |
risch | \(\frac {i \sqrt {\left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{2} a \,{\mathrm e}^{-2 i \left (f x +e \right )}}\, {\mathrm e}^{2 i \left (f x +e \right )}}{2 f \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )}-\frac {i \sqrt {\left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{2} a \,{\mathrm e}^{-2 i \left (f x +e \right )}}}{2 \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right ) f}-\frac {2 i \sqrt {\left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{2} a \,{\mathrm e}^{-2 i \left (f x +e \right )}}\, {\mathrm e}^{2 i \left (f x +e \right )}}{\left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right ) f \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )}\) | \(168\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.52, size = 45, normalized size = 0.79 \begin {gather*} -\frac {2 \, \sqrt {a} \tan \left (f x + e\right )^{2} + \sqrt {a}}{\sqrt {\tan \left (f x + e\right )^{2} + 1} f \tan \left (f x + e\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.40, size = 42, normalized size = 0.74 \begin {gather*} \frac {\sqrt {a \cos \left (f x + e\right )^{2}} {\left (\cos \left (f x + e\right )^{2} - 2\right )}}{f \cos \left (f x + e\right ) \sin \left (f x + e\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \sqrt {- a \left (\sin {\left (e + f x \right )} - 1\right ) \left (\sin {\left (e + f x \right )} + 1\right )} \cot ^{2}{\left (e + f x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.51, size = 90, normalized size = 1.58 \begin {gather*} \frac {{\left ({\left (\frac {1}{\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )} + \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )} \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 1\right ) + \frac {4 \, \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 1\right )}{\frac {1}{\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )} + \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )}\right )} \sqrt {a}}{2 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 18.53, size = 88, normalized size = 1.54 \begin {gather*} \frac {\sqrt {a-a\,{\left (\frac {{\mathrm {e}}^{-e\,1{}\mathrm {i}-f\,x\,1{}\mathrm {i}}\,1{}\mathrm {i}}{2}-\frac {{\mathrm {e}}^{e\,1{}\mathrm {i}+f\,x\,1{}\mathrm {i}}\,1{}\mathrm {i}}{2}\right )}^2}\,\left (-{\mathrm {e}}^{e\,2{}\mathrm {i}+f\,x\,2{}\mathrm {i}}\,6{}\mathrm {i}+{\mathrm {e}}^{e\,4{}\mathrm {i}+f\,x\,4{}\mathrm {i}}\,1{}\mathrm {i}+1{}\mathrm {i}\right )}{f\,\left ({\mathrm {e}}^{e\,4{}\mathrm {i}+f\,x\,4{}\mathrm {i}}-1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________